package com.proxy.jdk;

import java.lang.reflect.InvocationHandler;
import java.lang.reflect.Method;

/**
 * 描述:
 *
 * @author luzhongfu
 * Created by lucky on 2022-04-25 10:06 PM
 */
public class DemoProxy implements InvocationHandler {

    private Object targetObj;

    public DemoProxy(Object targetObj){
        this.targetObj = targetObj;
    }

    @Override
    public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {
        return method.invoke(targetObj,args);
    }
}
